<?php        
    class TemplateExerciseModel extends Model {
        public static $classDesc = "Template exercise";
        
        public static $keyDesc = array(
            "id"                => "ID",
            "templateid"        => "Template ID",
            "unit"              => "Unit",
            "extratext"         => "Name/desc",
            "special"           => "Special",
            "gear_belt"         => "Belt",
            "gear_knee_wraps"   => "Knee wraps",
            "gear_shirt"        => "Shirt",
            "gear_suit"         => "Suit",
            "gear_wrist_straps" => "Wrist straps",
            "gear_wrist_wraps"  => "Wrist wraps"
        );
        
        public function __construct($id = null) {
            $this->_childClass["template_exercise_set"] = "TemplateExerciseSetModel";
            
            $this->_childs["template_exercise_set"] = null;
            
            $this->_foreignIdCol    = "template_exerciseid";
            $this->_table           = "template_exercise";
            
            parent::__construct($id);
            
            # Varusteiden maksimit
            parent::$_schema["template_exercise"]["gear_belt"]["max"]           = 1;
            parent::$_schema["template_exercise"]["gear_knee_wraps"]["max"]     = 1;
            parent::$_schema["template_exercise"]["gear_shirt"]["max"]          = 1;
            parent::$_schema["template_exercise"]["gear_suit"]["max"]           = 1;
            parent::$_schema["template_exercise"]["gear_wrist_straps"]["max"]   = 1;
            parent::$_schema["template_exercise"]["gear_wrist_wraps"]["max"]    = 1;
        }
    }